package com.demo.装饰器;

/**
 * @ClassName SsoInterceptor
 * @Author bsy
 * @Description ：模拟单点登录
 * @Date 2023/1/15 22:00
 * @Version 1.0
 */
public class SsoInterceptor implements HandlerInterceptor{


    @Override
    public boolean preHandle(String request, String response, Object handler) {
        // 模拟获取cookie
        String ticket = request.substring(1, 8);
        // 模拟校验
        return ticket.equals("success");
    }
}
